#pragma once

#include <cftc/ducktype/xobject.h>

namespace cftf::meta
{
    class Loader;
}

namespace mt
{

    class MetaMgr : public cftf::util::Singleton<MetaMgr>
    {
        friend class cftf::util::Singleton<MetaMgr>;
    private:
        MetaMgr();

    public:
        void Init();
        void UnInit();

        const std::shared_ptr<cftc::ducktype::XObject>& GetConf() const { return conf_; }
        std::string GetDataDir();
    private:

        void Load();
        void RegisterDataSource();

    private:
        std::shared_ptr<cftc::ducktype::XObject> conf_;
        std::shared_ptr<cftf::meta::Loader> loader_;
	};

}
